<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>登录页</title>
	<!-- 引入semantic-ui的css -->
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
	<link rel="stylesheet" th:href="@{/css/me.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/vendor/bootstrap/css/bootstrap.min.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/fonts/font-awesome-4.7.0/css/font-awesome.min.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/fonts/iconic/css/material-design-iconic-font.min.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/css/util.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/css/main.css}">
	<!-- 引入 layui.css -->
	<link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
	<!-- 引入动画的css -->
	<link rel="stylesheet" th:href="@{/css/animate.css}">
	<link rel="shortcut icon" th:href="@{/images/logo.png}" type="image/x-icon">
	<script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>


</head>

<body>

<nav th:replace="_fragments :: menu(0)"></nav>

	<div class="limiter">
		<div class="container-login100" >
			<div class="wrap-login100 p-l-55 p-r-55 p-t-65 p-b-54 animate__animated animate__fadeInLeft">
				<form class="login100-form validate-form" method="post" th:action="@{/user/userLogin}">


					<span  class="login100-form-title p-b-49">登录</span>


					<div class="wrap-input100 validate-input m-b-23 alert-validate" th:if="${session.resultApi != null} and (${session.resultApi.code ==304} or ${session.resultApi.code ==305})"  th:data-validate="${session.resultApi.message}">
						<span class="label-input100">用户名</span>
						<input class="input100" type="text" name="username" placeholder="请输入用户名" autocomplete="off">
						<span class="focus-input100" data-symbol="&#xf206;"></span>
					</div>

					<div class="wrap-input100 validate-input m-b-23" th:unless="${session.resultApi != null} and (${session.resultApi.code ==304} or ${session.resultApi.code ==305})" data-validate="请输入用户名">
						<span class="label-input100">用户名</span>
						<input class="input100" type="text" name="username" placeholder="请输入用户名" autocomplete="off">
						<span class="focus-input100" data-symbol="&#xf206;"></span>
					</div>



					<div class="wrap-input100 validate-input alert-validate"  th:if="${session.resultApi != null} and (${session.resultApi.code ==303} or ${session.resultApi.code ==305})"  th:data-validate="${session.resultApi.message}">
						<span class="label-input100">密码</span>
						<input class="input100" type="password" name="password" placeholder="请输入密码">
						<span class="focus-input100" data-symbol="&#xf190;"></span>
					</div>

					<div class="wrap-input100 validate-input" th:unless="${session.resultApi != null} and (${session.resultApi.code ==303} or ${session.resultApi.code ==305})" data-validate="请输入密码">
						<span class="label-input100">密码</span>
						<input class="input100" type="password" name="password" placeholder="请输入密码">
						<span class="focus-input100" data-symbol="&#xf190;"></span>
					</div>


					<div class="container-login100-form-btn m-margin-top
">
						<div class="wrap-login100-form-btn">
							<div class="login100-form-bgbtn"></div>
							<button type="submit" class="login100-form-btn">登 录</button>
						</div>
					</div>

					<div class="txt1 text-center p-t-54 p-b-20">
						<span>---第三方登录---</span>
					</div>

					<div class="flex-c-m">
						<a href="#" class="login100-social-item bg1">
							<i class="fa fa-wechat"></i>
						</a>

						<a href="#" class="login100-social-item bg2">
							<i class="fa fa-qq"></i>
						</a>

						<a href="#" class="login100-social-item bg3">
							<i class="fa fa-weibo"></i>
						</a>
					</div>

					<div class="flex-col-c p-t-25" style="margin-right: 0.2em">
						<a style="float: right;margin-top: 1em" th:href="@{/register}" class="txt2">立即注册</a>
					</div>


				</form>
			</div>
		</div>
	</div>

	<script th:src="@{/vendor/jquery/jquery-3.2.1.min.js}"></script>
	<script th:src="@{js/main.js}"></script>
	<script>
		$('#editBlog').click(function() {
			var isLogin = $('#isLogin').text()

			if (Object.keys(isLogin).length === 0) {
				layer.alert('请先登录')
				// window.location.href = "/login"
			} else {
				window.location.href = "/blog/goEditBlogPage"
			}
		})
	</script>
</body>

</html>